This invention relates to video encoding and, more particularly, to ensuring integrity of the buffer of a video buffer verifier in an MPEG-like video encoder.
The Moving Picture Experts Group (MPEG) has the concept of a Video Buffer Verifier, or VBV, which is a hypothetical decoder conceptually connected to the output of an encoder. When it is time for the VBV to decode a picture, it instantaneously removes it from its buffer, the VBV buffer. This VBV buffer must never overflow or underflow in normal operation. If it overflows, data is lost. If it underflows, video data is not present when needed to decode a picture.
A Bit-Rate Controller (BRC) function of a corresponding encoder is responsible for ensuring integrity of the VBV buffer. The BRC cannot do this directly, since it lacks direct access to the VBV buffer; instead it monitors the fullness of mBuff, its model of the VBV buffer.
For this reason, the overall encoding system is responsible for ensuring that mBuff correctly represents the VBV buffer. Any number of factors can cause these buffers to differ, and such differences can accumulate, causing the VBV buffer to overflow or underflow.
U.S. Pat. No. 5,847,761, issued on Dec. 8, 1998, discloses an algorithm to ensure the validity of mBuff. The disclosed arrangement adjusts the number of bits in mBuff when it differs from the VBV buffer. Indeed, in order to effect such a scheme, the system needs direct control of mBuff. Consequently, this approach cannot be used if the system is unable to adjust the number of bits in the mBuff.
Problems regarding ensuring integrity of a video buffer verifier (VBV) employed in MPEG-like video encoders are addressed by controllably adjusting the bits being drained from a video encoder buffer (eBuff). The number of bits being drained from eBuff is adjusted through feedback to minimize the difference in the bit content of a buffer (mBuff) maintained in a bit-rate controller in the video encoder that models the buffer of a hypothetical decoder, and the bit content of that hypothetical buffer (vBuff).
Specifically, this is realized by controllably inhibiting transmission of bits from eBuff during intervals that the value of a prescribed relationship is greater than a predetermined value. In one example, the prescribed relationship is dependent on an instantaneous video encoding rate, an end-to-end delay, the bit content of mBuff and the bit content of eBuff.
In one embodiment of the invention, a constant video encoding rate is utilized in conjunction with a first prescribed relationship to control the bits being drained from eBuff.
In another embodiment of the invention, a variable video encoding rate is utilized in conjunction with a second prescribed relationship to control the bits being drained from eBuff.